<?php
/**
 * @link https://www.kancloud.cn/cleverstone/ymb2
 * @copyright Copyright (c) 2020 Yii Manager Software LLC
 */

/** @var \yii\web\View $this */
/** @var array $data 节点数据集合 */
/** @var array $options 元素节点选项 */
?>
    <div style="<?= $options['root']['style'] ?>" class="layui-timeline text-default <?= $options['root']['class'] ?>"<?= $options['root']['attribute'] ?>>
<?php foreach ($data as $item): ?>
        <div class="layui-timeline-item">
<?php if (!empty($item['icon'])): ?>
            <i style="<?= $options['icon']['style'] ?>" class="layui-timeline-axis f18 <?= $item['icon'] ?> <?= $options['icon']['class'] ?>"<?= $options['icon']['attribute'] ?>></i>
<?php endif; ?>
            <div class="layui-timeline-content layui-text">
<?php if (!empty($item['title'])): ?>
                <h3 style="<?= $options['title']['style'] ?>" class="layui-timeline-title f15 font-weight-bold <?= $options['title']['class'] ?>"<?= $options['title']['attribute'] ?>><?= $item['title'] ?></h3>
<?php endif; ?>
<?php if (!empty($item['content'])): ?>
                <div style="<?= $options['content']['style'] ?>" class="layui-timeline-detail <?= $options['content']['class'] ?>"<?= $options['content']['attribute'] ?>>
                    <?= $item['content'] ?>
                </div>
<?php endif; ?>
            </div>
        </div>
<?php endforeach; ?>
    </div>